package com.ys.entity.flow;

import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="YSP_TaskAudit", catalog="Id")
public class YspTaskAudit extends BaseEntity<YspTaskAudit> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="TaskId", nameJava="taskId", typeDataBase="bigint")
	private Long taskId;
	@YsField(nameDataBase="PrevId", nameJava="prevId", typeDataBase="bigint")
	private Long prevId;
	@YsField(nameDataBase="NodeIdCurrent", nameJava="nodeIdCurrent", typeDataBase="bigint")
	private Long nodeIdCurrent;
	@YsField(nameDataBase="NodeIdPrev", nameJava="nodeIdPrev", typeDataBase="bigint")
	private Long nodeIdPrev;
	@YsField(nameDataBase="State", nameJava="state", typeDataBase="int")
	private Integer state;
	@YsField(nameDataBase="Opinion", nameJava="opinion", typeDataBase="varchar")
	private String opinion;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public YspTaskAudit setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getTaskId() {
		return taskId;
	}
	public YspTaskAudit setTaskId(Long taskId) {
		this.taskId = taskId;
		return this;
	}
	public Long getPrevId() {
		return prevId;
	}
	public YspTaskAudit setPrevId(Long prevId) {
		this.prevId = prevId;
		return this;
	}
	public Long getNodeIdCurrent() {
		return nodeIdCurrent;
	}
	public YspTaskAudit setNodeIdCurrent(Long nodeIdCurrent) {
		this.nodeIdCurrent = nodeIdCurrent;
		return this;
	}
	public Long getNodeIdPrev() {
		return nodeIdPrev;
	}
	public YspTaskAudit setNodeIdPrev(Long nodeIdPrev) {
		this.nodeIdPrev = nodeIdPrev;
		return this;
	}
	public Integer getState() {
		return state;
	}
	public YspTaskAudit setState(Integer state) {
		this.state = state;
		return this;
	}
	public String getOpinion() {
		return opinion;
	}
	public YspTaskAudit setOpinion(String opinion) {
		this.opinion = opinion;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public YspTaskAudit setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public YspTaskAudit setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public YspTaskAudit setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static YspTaskAudit yspTaskAudit(
		Long taskId,
		Long prevId,
		Long nodeIdCurrent,
		Long nodeIdPrev,
		Integer state,
		String opinion,
		Integer status
			) {
		YspTaskAudit entity = new YspTaskAudit();
		entity.setTaskId(taskId);
		entity.setPrevId(prevId);
		entity.setNodeIdCurrent(nodeIdCurrent);
		entity.setNodeIdPrev(nodeIdPrev);
		entity.setState(state);
		entity.setOpinion(opinion);
		entity.setStatus(status);
		return entity;
	}
}